package com.atguigu.tingshu.order.service;

import com.atguigu.tingshu.model.order.OrderInfo;
import com.atguigu.tingshu.vo.order.OrderMsg;
import com.atguigu.tingshu.vo.order.OrderInfoVo;
import com.atguigu.tingshu.vo.order.TradeVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * @author sun
 */
public interface OrderInfoService extends IService<OrderInfo> {

    /**
     * 订单确认
     * @param tradeVo 订单确认对象
     * @return 订单VO对象
     */
    OrderInfoVo trade(TradeVo tradeVo);

    /**
     * 提交订单
     * @param orderInfoVo 订单VO对象
     * @return 订单ID
     */
    Map<String, Object> submitOrder(OrderInfoVo orderInfoVo);

    /**
     * 取消订单
     * @param msg 订单删除信息
     */
    void cancelOrder(OrderMsg msg);

    /**
     * 订单支付成功
     * @param orderNo 订单编号
     */
    void successOrder(String orderNo);
}
